package com.lapian.designmode.flyweight.test.test_e;

import com.lapian.designmode.flyweight.my.AbstractRole;

import java.util.HashMap;

public class DouLuoDaLuFactoryE {
    HashMap<String,ConcreteRoleE> pool=new HashMap<>();
    public AbstractRoleE getRoleCategory(String type) {
        if (!pool.containsKey(type)) {
            pool.put(type,new ConcreteRoleE(type));

        }
        return pool.get(type);
    }
}
